package com.nmgydy.model;

import com.nmgydy.util.Functions;

import javax.persistence.*;

@Entity
@Table(name="cn_event_item") //展览明细
public class EventItem {
	private Integer id;
	private Integer courtId;
	private String number;//案号
	private String name;//案件名称
	private String caseType;//案件类型（1.民事案件 2.刑事案件）
	private String reason;//立案案由
	private String caseDate;//立案日期
	private String createTime;//创建时间
	private String updateTime;//更新时间
	private Integer userId;//操作人ID
	private String userName;//操作人
	private String eventType;//事件类型（1.预警 2.逾期）
	private Integer remainDays;//剩余天数
	private Integer overdueDays;//逾期天数
	private String status;//处理状态（0.正常 1.未处理 2.已填报 3.已处理 4.已退回）
	private String message;//填报内容
	private Integer taskId;//任务ID
	private String taskName;//任务名称


	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getCourtId() {
		return courtId;
	}

	public void setCourtId(Integer courtId) {
		this.courtId = courtId;
	}

	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	public String getCaseType() {
		return caseType;
	}

	public void setCaseType(String caseType) {
		this.caseType = caseType;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public String getCaseDate() {
		return caseDate;
	}

	public void setCaseDate(String caseDate) {
		this.caseDate = caseDate;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public String getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getEventType() {
		return eventType;
	}

	public void setEventType(String eventType) {
		this.eventType = eventType;
	}

	public Integer getRemainDays() {
		return remainDays;
	}

	public void setRemainDays(Integer remainDays) {
		this.remainDays = remainDays;
	}

	public Integer getOverdueDays() {
		return overdueDays;
	}

	public void setOverdueDays(Integer overdueDays) {
		this.overdueDays = overdueDays;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Integer getTaskId() {
		return taskId;
	}

	public void setTaskId(Integer taskId) {
		this.taskId = taskId;
	}

	public String getTaskName() {
		return taskName;
	}

	public void setTaskName(String taskName) {
		this.taskName = taskName;
	}

	public void fillWithCourt(Court court){
		this.setCourtId(court.getId());
		this.setNumber(court.getNumber());
		this.setCaseType(court.getCaseType());
		this.setName(court.getName());
		this.setReason(court.getReason());
		this.setCaseDate(court.getCaseDate());
		this.setCreateTime(Functions.getTimeNow());
		this.setUserId(court.getUserId());
		this.setUserName(court.getUserName());
		this.setTaskId(court.getTaskId());
		this.setTaskName(court.getTaskName());
	}
}
